<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of db
 *
 * @author IT
 */
class db {
    

function ketnoi($query)
{
    $connection = mysql_connect("localhost","root","vertrigo");
    mysql_select_db("new",$connection);
    mysql_query("SET character_set_result = utf-8",$connection);
    $ret = mysql_query($query,$connection)or die(" Ket noi du lieu that bai");
    return $ret;
}
function xemdl($query)
{
    $ret = $this->ketnoi($query);
    $data = array();
    while($row = mysql_fetch_assoc($ret))
            $data[] = $row;
    return $data;
}



}
